Skip to content

Add SolrCloud update consistency documentation - #4716

Draft
dsmiley wants to merge 2 commits into
apache:mainfrom
dsmiley:dev-docs-update-internals
Draft

Add SolrCloud update consistency documentation#4716
dsmiley wants to merge 2 commits into
apache:mainfrom
dsmiley:dev-docs-update-internals

Conversation

@dsmiley

@dsmiley dsmiley commented Aug 6, 2026

Copy link
Copy Markdown
Contributor
  • New ref guide page solrcloud-update-consistency.adoc stating the consistency model of /update in SolrCloud: acknowledgment semantics, durability, ordering, atomicity, visibility, optimistic concurrency, retry-ability, and leader failover
  • New dev-docs/distributed-update-internals.adoc: implementation deep-dive of the distributed update path (routing, fan-out, acknowledgment and error handling, shard terms) and versioning/optimistic concurrency, with an eye toward reasoning about idempotency and retries
  • AGENTS.md: add a Developer Docs Index so coding agents discover dev-docs/ when working on related topics

I want more documentation about Solr's consistency model and on how Solr implements it. So I had Claude Fable work on producing this. Ultimately I want to discuss atomicity / idempotency... that's either a follow-on conversation or could very well happen here.

The first commit here is submitted with zero a-priori review; I will review it momentarily here and hopefully others will to.

- New ref guide page solrcloud-update-consistency.adoc stating the consistency model of /update in SolrCloud: acknowledgment semantics, durability, ordering, atomicity, visibility, optimistic concurrency, retry-ability, and leader failover
- New dev-docs/distributed-update-internals.adoc: implementation deep-dive of the distributed update path (routing, fan-out, acknowledgment and error handling, shard terms) and versioning/optimistic concurrency, with an eye toward reasoning about idempotency and retries
- AGENTS.md: add a Developer Docs Index so coding agents discover dev-docs/ when working on related topics

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Comment thread AGENTS.md

Internals:

- `dev-docs/overseer/overseer.adoc` — Overseer: cluster state updates, ZkStateWriter, collection API message flow

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This new section looks very useful for agents, like a "map" of where to read more on dev topics. I like it.

@github-actions github-actions Bot added the documentation Improvements or additions to documentation label Aug 16, 2026

Developers interested in how these guarantees are implemented should read the companion document https://github.com/apache/solr/blob/main/dev-docs/distributed-update-internals.adoc[Distributed Update Internals] in the source repository.

== What a Successful Update Means

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"Replication" might be a better heading for the content

There is no ordering guarantee *across different documents*.
Documents sent in one batch may be applied on replicas, and become searchable, in a different order than submitted — especially across shards.

== Atomicity

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Needs more wording around nested documents. And maybe for in-place updates.
Should reference the TolerantUpdateProcessor.
Should reference the rollback command.


== Visibility

An update is not searchable until a commit opens a new searcher; durability (via the transaction log and hard commits) and searchability are independent.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would be worth a note on routing requests by the same user/client to the same replica to combat strange visibility issues.


The exception is xref:configuration-guide:realtime-get.adoc[RealTime Get], which retrieves the latest version of a document by id — including uncommitted updates — directly from the transaction log.

== Optimistic Concurrency

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should reference DocBasedVersionConstraintsProcessor


C->>N: /update (batch of docs)
N->>L: forward each doc (DistribPhase=TOLEADER)
L->>L: per-doc lock; OCC check; assign _version_

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this diagram isn't being rendered by GitHub. And IntelliJ complained on this line " or ID expected, got ';'" (GitHub complained likewise)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants